﻿using System;
using oop4;

class Program : ContactSystem
{
    static void Main(string[] args)
    {
        List<Contact> contacts = new List<Contact>();
        loadContact();
        while (true)
        {
            Console.WriteLine("个人联系人系统\n" +
            "1.添加联系人\n" +
            "2.修改联系人\n" +
            "3.删除联系人\n" +
            "4.查询联系人\n" +
            "5.显示所有联系人\n" +
            "6.退出系统\n" +
            "********************************\n" +
            "请输出[1 - 6]: ");

            string cmd = Console.ReadLine();
            Contact contact = new Contact();
            switch (cmd)
            {
                case "1":
                    addContact();
                    break;
                case "2":
                    EditContact();
                    break;
                case "3":
                    deleteContact();
                    break;
                case "4":
                    searchContact("4");
                    break;
                case "5":
                    searchContact("5");
                    break;
                case "6":
                    saveContact();
                    break;
            }
        }

    }
}